
#include "FarFieldBC.h"
#include "Attitude.h"
#include "Eigen/Geometry"
#include "MooseMesh.h"
using namespace Eigen;

template<>
InputParameters validParams<FarFieldBC>()
{
	InputParameters params = validParams<CFDBC>();
	return params;
}

FarFieldBC::FarFieldBC(const InputParameters & parameters):
	CFDBC(parameters),
	_rho_inf(1.0),
	_vel_size_inf(1.0),
	_tem_inf(1.0),
	_p_inf(_rho_inf*_tem_inf/_gamma/_mach/_mach)
{
	Vector3d vel_inf = _vel_size_inf*(_attitude.earthFromWind()*Vector3d::UnitX());
	if(_mesh.dimension() == 2)
	{
		vel_inf(2) = 0.;
	}
	else if(_mesh.dimension() == 1)
	{
		vel_inf(1) = 0.;
		vel_inf(2) = 0.;
	}

	_vel_inf(0) = vel_inf(0);
	_vel_inf(1) = vel_inf(1);
	_vel_inf(2) = vel_inf(2);
}

